import http from '@/common/vmeitime-http/interface.js'

// 根据年级取文章列表
export const getArticleByGrade = (bb_code, nj_code, xd_code, xk_code) => {
	return http.post('/wxapi/lessonList', {
		bb: bb_code,
		nj: nj_code,
		xd: xd_code,
		xk: xk_code
	})
}
// 取微用户的OPEN ID
export const userLogin = (code, iv, encryptedData, userInfo) => {
	return http.get('/wxapi/wxlogin', {
		code: code,
		iv: iv,
		encryptedData: encryptedData,
		userInfo: userInfo
	})
}

// 取签到天数
export const getSign = (open_id) => {
	return http.get('/wxapi/clockIn', {
		type: 'show',
		open_id: open_id
	})
}
// 签到
export const setSign = (open_id) => {
	return http.get('/wxapi/clockIn', {
		type: 'incr',
		open_id: open_id
	})
}




// // 根据年级列表
// export const getGradeList = () => {
// 	return http.post('getAllGradeData',{})
// }



export default {
	getArticleByGrade,
	//getGradeList,
	userLogin,
	getSign,
	setSign,
}
